﻿<Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions" xmlns:ee="http://schemas.microsoft.com/expression/2010/effects" xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing" mc:Ignorable="d" x:Class="MainWindow"
    Title="ch@tr" Height="495" Width="356" WindowStyle="ThreeDBorderWindow" Icon="/ch@tr;component/ch@tr%20icon.ico" MinWidth="200">
	<Window.Resources>
		<Color x:Key="busyColor">Red</Color>
	</Window.Resources>
	
	<Grid x:Name="LayoutRoot">
		
		<VisualStateManager.CustomVisualStateManager>
			<ei:ExtendedVisualStateManager/>
		</VisualStateManager.CustomVisualStateManager>
		<VisualStateManager.VisualStateGroups>
			<VisualStateGroup x:Name="VisualStateGroup">
				<VisualStateGroup.Transitions>
					<VisualTransition GeneratedDuration="0:0:1">
						<ei:ExtendedVisualStateManager.TransitionEffect>
							<ee:FadeTransitionEffect/>
						</ei:ExtendedVisualStateManager.TransitionEffect>
					</VisualTransition>
				</VisualStateGroup.Transitions>
				<VisualState x:Name="login1">
					<Storyboard>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="chat">
							<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
						</ObjectAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
				<VisualState x:Name="chat1">
					<Storyboard>
						<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="login">
							<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
						</DoubleAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="login">
							<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
						</ObjectAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="chat">
							<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
						</DoubleAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
			</VisualStateGroup>
		</VisualStateManager.VisualStateGroups>
		<Grid x:Name="login" Margin="0" d:IsHidden="True">
            
			<StackPanel HorizontalAlignment="Center"  VerticalAlignment="Center" >
				<TextBlock Height="19.833" TextWrapping="Wrap" Width="65.222" HorizontalAlignment="Left" Foreground="#FF5A5A5A"><Run Text="Username:"/><LineBreak/><Run/></TextBlock>
				<TextBox x:Name="usernameBox" Width="188.443" Margin="0,0,0,10" Height="22.809" HorizontalAlignment="Center"/>
				<TextBlock Height="19.833" TextWrapping="Wrap" Width="65.222" HorizontalAlignment="Left" Foreground="#FF5A5A5A" Text="Password:"/>
				<PasswordBox x:Name="password" Width="188.443" Margin="0,0,0,10" Height="20.565" HorizontalAlignment="Center"/>
				<CheckBox x:Name="passwordRemember" Content="Remember password"/>
				<Button x:Name="loginButton" Content="Login" Height="31.96" Width="82.443"/>
				
			</StackPanel>
		</Grid>
		<Grid x:Name="chat" Opacity="0">
            <Popup x:Name="PopupTest" AllowsTransparency="True" Width="315" MaxHeight="260" >
                <Border x:Name="border" BorderThickness="1" BorderBrush="Gray">
                	<Grid Width="315" MaxHeight="260" Background="White"  >
                		<Grid.RowDefinitions>
                			<RowDefinition Height="0.177*"/>
                			<RowDefinition Height="0.708*"/>
                			<RowDefinition Height="0.115*"/>
                		</Grid.RowDefinitions>
                		<Grid.ColumnDefinitions>
                			<ColumnDefinition Width="0.716*"/>
                			<ColumnDefinition Width="0.284*"/>
                		</Grid.ColumnDefinitions>
                		     <TextBlock Text="" FontSize="16" x:Name="popupName" Margin="0,0,-7.44,0" />
                        <TextBlock Text="" FontSize="10" TextWrapping="Wrap" Grid.RowSpan="1" Grid.Row="1" x:Name="popupStatus" VerticalAlignment="Top" Margin="0,0,-7.44,0" />      	
						 <Label VerticalAlignment="Bottom" Grid.Row="2" Grid.ColumnSpan="2" x:Name="popupJID">
                            <Hyperlink/>
                        </Label>
						     <Image x:Name="popupAvatar" Width="88" Height="88" HorizontalAlignment="right" VerticalAlignment="Top" Grid.Column="1" Grid.RowSpan="3" Margin="-14.88,0,0,0"/>
					</Grid>
                </Border>
            </Popup>
            <StackPanel Orientation="Vertical" >
                <StackPanel Orientation="Horizontal" x:Name="headerStuff" Margin="5,10,10,10">
                    <Border  CornerRadius="3" BorderThickness="8" x:Name="statusBorder" Margin="0,0,0,0" Panel.ZIndex="-1" VerticalAlignment="Top" HorizontalAlignment="Left">
                    	<Border.BorderBrush>
                    		<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    			<GradientStop Color="{DynamicResource busyColor}" Offset="1"/>
                    			<GradientStop Color="#FF560000"/>
                    		</LinearGradientBrush>
                    	</Border.BorderBrush>
                    <Image Width="80" Height="80" Source="thomas.jpg" x:Name="avatarPIc"/></Border>
                    <StackPanel Orientation="Vertical">
                       <!-- <TextBlock Text="Username" x:Name="usernameText" FontSize="16" />-->
                        <StackPanel Orientation="Vertical" Margin="10,10,0,0">
                            <TextBox Text="Set Your Status Here" x:Name="statusBox"  Margin="0,0,0,10" BorderBrush="{x:Null}"  MaxWidth="500" Width="110" SelectionBrush="#FF959595" MinWidth="30" HorizontalAlignment="Left" MaxHeight="200" />
                            <ComboBox Margin="0,0,0,10" Width="89" x:Name="onlineStatus" HorizontalAlignment="left" SelectedIndex="0" Background="{x:Null}" BorderThickness="0" BorderBrush="{x:Null}">
                                <ComboBoxItem Foreground="Black">
                                	<StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                                		<Ellipse Height="10" Width="10">
                                			<Ellipse.Stroke>
                                				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                					<GradientStop Color="#FF00FF3E" Offset="0"/>
                                					<GradientStop Color="#FF007C19" Offset="1"/>
                                				</LinearGradientBrush>
                                			</Ellipse.Stroke>
                                			<Ellipse.Fill>
                                				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                					<GradientStop Color="#FF00FF3E" Offset="0.004"/>
                                					<GradientStop Color="#FF007C19" Offset="1"/>
                                				</LinearGradientBrush>
                                			</Ellipse.Fill>
                                		</Ellipse>
                                		<TextBlock Height="16.667" TextWrapping="Wrap" Text="Available" Width="55.333" Margin="4,0,0,0"/>
                                	</StackPanel>
                                </ComboBoxItem>
                                <ComboBoxItem Foreground="Black">
                                	<StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                                		<Ellipse Height="10" Width="10">
                                			<Ellipse.Stroke>
                                				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                					<GradientStop Color="Red" Offset="0"/>
                                					<GradientStop Color="#FF560000" Offset="1"/>
                                				</LinearGradientBrush>
                                			</Ellipse.Stroke>
                                			<Ellipse.Fill>
                                				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                					<GradientStop Color="Red" Offset="0.009"/>
                                					<GradientStop Color="#FF560000" Offset="1"/>
                                				</LinearGradientBrush>
                                			</Ellipse.Fill>
                                		</Ellipse>
                                		<TextBlock Height="16.667" TextWrapping="Wrap" Text="Busy" Width="55.333" Margin="4,0,0,0"/>
                                	</StackPanel>
                                </ComboBoxItem>
                                <ComboBoxItem Foreground="Black">
                                	<StackPanel Orientation="Horizontal">
                                		<Ellipse Height="10" Width="10">
                                			<Ellipse.Stroke>
                                				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                					<GradientStop Color="#FFFF9800" Offset="0"/>
                                					<GradientStop Color="#FF7C5500" Offset="1"/>
                                				</LinearGradientBrush>
                                			</Ellipse.Stroke>
                                			<Ellipse.Fill>
                                				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                					<GradientStop Color="#FFFF9800" Offset="0.004"/>
                                					<GradientStop Color="#FF7C5500" Offset="0.991"/>
                                				</LinearGradientBrush>
                                			</Ellipse.Fill>
                                		</Ellipse>
                                		<TextBlock Height="16.667" TextWrapping="Wrap" Text="Away" Width="55.333" Margin="4,0,0,0"/>
                                	</StackPanel>
                                </ComboBoxItem>
                                <ComboBoxItem Foreground="Black">
                                	<StackPanel Orientation="Horizontal">
                                		<Ellipse Height="10" Width="10">
                                			<Ellipse.Stroke>
                                				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                					<GradientStop Color="#FFFF9800" Offset="0"/>
                                					<GradientStop Color="#FF666666" Offset="1"/>
                                					<GradientStop Color="#FFC6C5C3" Offset="0.022"/>
                                				</LinearGradientBrush>
                                			</Ellipse.Stroke>
                                			<Ellipse.Fill>
                                				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                					<GradientStop Color="#FFC6C5C3"/>
                                					<GradientStop Color="#FF666666" Offset="0.991"/>
                                				</LinearGradientBrush>
                                			</Ellipse.Fill>
                                		</Ellipse>
                                		<TextBlock Height="16.667" TextWrapping="Wrap" Text="Invisible" Width="55.333" Margin="4,0,0,0"/>
                                	</StackPanel>
                                </ComboBoxItem>
                            </ComboBox>
                            
                        </StackPanel>
                    </StackPanel>
                </StackPanel>
                <ScrollViewer VerticalScrollBarVisibility="auto" HorizontalScrollBarVisibility="hidden" x:Name="scrollViewer">
                     				<StackPanel Orientation="Vertical" x:Name="contacts" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>	
                 </ScrollViewer>
			</StackPanel>  	
		</Grid>
		<Grid x:Name="reconnecting" Opacity="0.805" Visibility="Hidden">
			<Grid.Background>
				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
					<GradientStop Color="#FF1D1D1D" Offset="0.009"/>
					<GradientStop Color="#FF212121" Offset="1"/>
					<GradientStop Color="#FF454545" Offset="0.5"/>
				</LinearGradientBrush>
			</Grid.Background>
			<ed:Callout AnchorPoint="0.899,1.629" CalloutStyle="Rectangle" Content="Attempting to reconnect..." Fill="#FFF4F4F5" FontSize="10.667" Height="35" Margin="0,0,8,28" Stroke="Black" VerticalAlignment="Bottom" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Right" Width="119">
				<ed:Callout.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleY="1" ScaleX="1"/>
						<SkewTransform AngleY="0" AngleX="0"/>
						<RotateTransform Angle="0"/>
						<TranslateTransform/>
					</TransformGroup>
				</ed:Callout.RenderTransform>
			</ed:Callout>
		</Grid>
	</Grid>
</Window>
